package com.xjscrm.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xjscrm.console.dto.circle.CircleTaskSearchDTO;
import com.xjscrm.console.entity.CircleTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mingyang.chen create in 2024/4/9 上午10:33
 */
@Mapper
public interface CircleTaskMapper extends CommonMapper<CircleTask> {

    int deleteByPrimaryKey(Long id);

    int insertSelective(CircleTask record);

    CircleTask selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CircleTask record);

    List<CircleTask> selectPage(Page<CircleTask> page, @Param("query") CircleTaskSearchDTO source);

    int updateStatusIsExecuting(@Param("merId") Long merId, @Param("taskId") Long taskId);

    List<CircleTask> selectListWithValidByMerId(Long merId);

    void updateStatusIsComplete(@Param("merId") Long merId, @Param("id") Long taskId);
}